home *** CD-ROM | disk | FTP | other *** search
/ Software of the Month Club 2000 October / Software of the Month - Ultimate Collection Shareware 277.iso / pc / PROGRAMS / UTILITY / WINLINUX / DATA1.CAB / programs_-_gtk / INCLUDE / GTK / GTKPANED.H < prev    next >
C/C++ Source or Header  |  1999-09-17  |  3KB  |  120 lines

  1. /* GTK - The GIMP Toolkit
  2.  * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
  3.  *
  4.  * This library is free software; you can redistribute it and/or
  5.  * modify it under the terms of the GNU Library General Public
  6.  * License as published by the Free Software Foundation; either
  7.  * version 2 of the License, or (at your option) any later version.
  8.  *
  9.  * This library is distributed in the hope that it will be useful,
  10.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  12.  * Library General Public License for more details.
  13.  *
  14.  * You should have received a copy of the GNU Library General Public
  15.  * License along with this library; if not, write to the
  16.  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  17.  * Boston, MA 02111-1307, USA.
  18.  */
  19.  
  20. /*
  21.  * Modified by the GTK+ Team and others 1997-1999.  See the AUTHORS
  22.  * file for a list of people on the GTK+ Team.  See the ChangeLog
  23.  * files for a list of changes.  These files are distributed with
  24.  * GTK+ at ftp://ftp.gtk.org/pub/gtk/. 
  25.  */
  26.  
  27. #ifndef __GTK_PANED_H__
  28. #define __GTK_PANED_H__
  29.  
  30.  
  31. #include <gdk/gdk.h>
  32. #include <gtk/gtkcontainer.h>
  33.  
  34.  
  35. #ifdef __cplusplus
  36. extern "C" {
  37. #endif /* __cplusplus */
  38.  
  39.  
  40. #define GTK_TYPE_PANED                  (gtk_paned_get_type ())
  41. #define GTK_PANED(obj)                  (GTK_CHECK_CAST ((obj), GTK_TYPE_PANED, GtkPaned))
  42. #define GTK_PANED_CLASS(klass)          (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_PANED, GtkPanedClass))
  43. #define GTK_IS_PANED(obj)               (GTK_CHECK_TYPE ((obj), GTK_TYPE_PANED))
  44. #define GTK_IS_PANED_CLASS(klass)       (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_PANED))
  45.  
  46.  
  47. typedef struct _GtkPaned       GtkPaned;
  48. typedef struct _GtkPanedClass  GtkPanedClass;
  49.  
  50. struct _GtkPaned
  51. {
  52.   GtkContainer container;
  53.   
  54.   GtkWidget *child1;
  55.   GtkWidget *child2;
  56.   
  57.   GdkWindow *handle;
  58.   GdkRectangle groove_rectangle;
  59.   GdkGC *xor_gc;
  60.  
  61.   /*< public >*/
  62.   guint16 handle_size;
  63.   guint16 gutter_size;
  64.  
  65.   /*< private >*/
  66.   gint child1_size;
  67.   gint last_allocation;
  68.   gint min_position;
  69.   gint max_position;
  70.   
  71.   guint position_set : 1;
  72.   guint in_drag : 1;
  73.   guint child1_shrink : 1;
  74.   guint child1_resize : 1;
  75.   guint child2_shrink : 1;
  76.   guint child2_resize : 1;
  77.   
  78.   gint16 handle_xpos;
  79.   gint16 handle_ypos;
  80. };
  81.  
  82. struct _GtkPanedClass
  83. {
  84.   GtkContainerClass parent_class;
  85. };
  86.  
  87.  
  88. GtkType gtk_paned_get_type        (void);
  89. void    gtk_paned_add1            (GtkPaned  *paned,
  90.                    GtkWidget *child);
  91. void    gtk_paned_add2            (GtkPaned  *paned,
  92.                    GtkWidget *child);
  93. void    gtk_paned_pack1           (GtkPaned  *paned,
  94.                    GtkWidget *child,
  95.                    gboolean   resize,
  96.                    gboolean   shrink);
  97. void    gtk_paned_pack2           (GtkPaned  *paned,
  98.                    GtkWidget *child,
  99.                    gboolean   resize,
  100.                    gboolean   shrink);
  101. void    gtk_paned_set_position    (GtkPaned  *paned,
  102.                    gint       position);
  103. void    gtk_paned_set_handle_size (GtkPaned *paned,
  104.                    guint16   size);
  105. void    gtk_paned_set_gutter_size (GtkPaned *paned,
  106.                    guint16   size);
  107.  
  108. /* Internal function */
  109. void    gtk_paned_compute_position (GtkPaned *paned,
  110.                     gint      allocation,
  111.                     gint      child1_req,
  112.                     gint      child2_req);
  113.  
  114. #ifdef __cplusplus
  115. }
  116. #endif /* __cplusplus */
  117.  
  118.  
  119. #endif /* __GTK_PANED_H__ */
  120.